<!DOCTYPE html>
<html lang="ch-cn">
<head>
    　　<meta charset="utf-8">
    <link type="text/css"rel="stylesheet" href="alert.css"/>
</head>
<body >
<div class='xgalert'>
    <div class="modal-preview">
        <div class="modal modal-primary">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                        <h4 id='alert_title' class="modal-title"></h4>
                    </div>
                    <div class="modal-body">
                        <p id='alert_des'></p>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-primary">确定</button>
                        <button type="button" class="btn btn-warning" data-dismiss="modal">取消</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script type="text/javascript" src='jquery-2.1.4.js'></script>
<script type="text/javascript" src='alert.js'></script>
<script type="text/javascript">
    alert("");
//       alert("自定义标题","alert");
//    alert("自定义标题","alert",function(){alert("这个是alert回调结果")});
//    alert("alert",function(){alert("这个是alert回调结果")});
//    confirm("confirm没有回调会提示错误");
//    confirm("confirm没有回调会提示错误",function(){alert("这个是comfirm回调结果")});
//    confirm("自定义标题","confirm没有回调会提示错误",function(){alert("这个是comfirm回调结果")});
</script>
</html>